<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>详情</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        标准规范>
        <a lay-href="/standard/record/list.action">管理标准规范</a>>
        <zmn>[[${standardRecord.title}]]</zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="standard/record/_tab::tab"></div>

        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="standardId" th:value="${standardRecord.standardId}">

                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">所属分类：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <select lay-filter="category" id="category" name="category" lay-search lay-verify="required">
                            <option value="" th:selected="${0 == standardRecord.category}">全部</option>
                            <option th:each="category:${categorys}" th:value="${category.code}" th:selected="${category.code == standardRecord.category}" th:text="${category.name}"/>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">版本号：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="version" th:value="${standardRecord.version}" lay-verify="required" autocomplete="off" class="layui-input" maxlength="10"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">文章标题：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="text" name="title" th:value="${standardRecord.title}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                    <span class="layui-form-label" style="width: auto; color: #9F9F9F;">不超过100个字符</span>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">关键词：</label>
                    <div class="layui-input-block" style="width: 1200px">
                        <div class="layui-inline">
                            <textarea style="width: 450px" name="keyWord" placeholder="请输入，最大：100字" class="layui-textarea" th:text="${standardRecord.keyWord}" maxlength="100"></textarea>
                        </div>
                        <div class="layui-inline">
                            <span class="layui-form-label" style="width: auto; color: #9F9F9F;">多个关键词用英文,分割</span>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">发布部门：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <select lay-filter="oneDeptId" id="oneDeptId" name="deptOneId" lay-search lay-verify="required">
                            <option value=""></option>
                            <option th:each="dept:${oneDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == standardRecord.deptOneId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                    <div class="layui-input-inline" style="width:300px">
                        <select id="deptId" name="deptTwoId" lay-search>
                            <option value=""></option>
                            <option th:each="dept:${twoDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == standardRecord.deptTwoId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">是否必须阅读：</label>
                    <div class="layui-input-inline" style="width:300px">
                        <input type="radio" name="mustRead" value="2"
                               th:checked="${standardRecord.mustRead == 2 || standardRecord.mustRead == null}" title="是" lay-verify="required">
                        <input type="radio" name="mustRead" value="1"
                               th:checked="${standardRecord.mustRead == 1}" title="否" lay-verify="required">
                    </div>
                </div>


                <zmn th:if="${standardRecord.standardId > 0}">
                    <div class="layui-card-header layui-margin-b"><b>其他信息</b></div>

                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label">修改人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux" th:text="${standardRecord.updater} + '&nbsp;/&nbsp;' + ${#dates.format(standardRecord.updateTime, 'yyyy-MM-dd HH:mm:ss')}">修改人/时间</div>
                        </div>
                    </div>
                    <div class="layui-form-item layui-form-item-sm">
                        <label class="layui-form-label">创建人/时间：</label>
                        <div class="layui-input-block">
                            <div class="layui-form-mid layui-word-aux" th:text="${standardRecord.creater} + '&nbsp;/&nbsp;' + ${#dates.format(standardRecord.createTime, 'yyyy-MM-dd HH:mm:ss')}">创建人/时间</div>
                        </div>
                    </div>
                </zmn>

                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button th:if="${#authPermit.checkPermit('/standard/record/addEditDetail.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">下一步</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        standardRecord: [[${standardRecord}]],
        oneDepts: [[${oneDepts}]],
        twoDepts: [[${twoDepts}]]
    };

    layui.config({
        version: 20200218,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        standard_record_detail_edit_js: "standard/record/zmn.plat.standard.record.detail.edit",
    }).use(['index', 'standard_record_detail_edit_js']);
</script>
</body>
</html>